/*
 * globals.h
 *
 *  Created on: Sep 23, 2011
 *      Author: kunu
 */

#include "pthread.h"
#include <time.h>

#ifndef GLOBALS_H_
#define GLOBALS_H_

extern int G_argc;
extern char **G_argv;

#define NUM_SLOTS 		4
#define SLOT_EMPTY 		true
#define SLOT_FILLED 	false

#define SAMPLE_SIZE 	512
#define SAMPLE_RATE 	44100

struct data_bundle {
	bool buf_d_status[NUM_SLOTS];
	float *buf_d_slot[NUM_SLOTS];

	pthread_mutex_t *buf_d_slot_mutex[NUM_SLOTS];
	pthread_cond_t *notFull, *notEmpty;
	unsigned int NRS;
	unsigned int NFS;

	unsigned int sidx;
//	pthread_mutex_t slot_syn_mutex;
};

extern bool kill_all_flag;
extern bool kill_rt_player;
extern bool kill_synthesiser;

extern int count;
extern clock_t start;
extern double duration1;
extern double kernel_time;

extern float *temp_buf;

extern bool kill_log;

//extern data_bundle shared_data_bundle;

#endif /* GLOBALS_H_ */
